import React, { PureComponent } from 'react'
import PropTypes from 'prop-types'
import { Steps } from 'antd'

import Style from './statusFlow.css'

const { Step } = Steps

class statusFlow extends PureComponent {
  static propTypes = {
    list: PropTypes.array
  }

  constructor (props) {
    super(props)
    this.state = {
    }
  }

  render () {
    const { list } = this.props
    return (
      <Steps className={Style.steps}>
        {list.map(n => {
          return (
            <Step key={n.name} title={n.name} description={n.time} status={n.time ? 'finish' : ''} />
          )
        })}
      </Steps>
    )
  }
}

export default statusFlow
